<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2016/9/18 0018
 * Time: 15:30
 */

namespace Admin\Controller;
use Think\Controller;
class EditNewsController extends Controller
{

    public function index(){
        $id=session('id');
        $adminmodel=M('admin');
        $admin=$adminmodel->where(array('id'=>$id))->select();
        $this->admin=$admin;
        if(!$id)
        {$this->error('登录已过期!',U("index.php/Admin/Index/index"));}
        elseif ($admin){
            $this->assign('admin', $admin);
            $this->display();
        }
        else{$this->display();}


    }







}